public class traning01 {
    public static void main(String[] args) {
      int count = 0;
      for ( int i = 100; i < 1000; i++){
          int g = i%10;
          int s = i/10%10;
          int b = i/100;
          if (g*g*g+s*s+b*b*b==i){
              count++;
              System.out.println(i);
          }
      }
        System.out.println("1000以内水仙花数的个数：" +count);
    }
}
